//
//  UIView+lnFrame.m
//  lnDevLibExample
//
//  Created by apple on 16/5/12.
//  Copyright © 2016年 Mike_He. All rights reserved.
//

#import "UIView+LNFrame.h"

@implementation UIView (LNFrame)

- (void)setLn_x:(CGFloat)ln_x
{
    CGRect frame = self.frame;
    frame.origin.x = ln_x;
    self.frame = frame;
}
- (CGFloat)ln_x
{
    return self.frame.origin.x;
}




- (void)setLn_y:(CGFloat)ln_y
{
    CGRect frame = self.frame;
    frame.origin.y = ln_y;
    self.frame = frame;
}
- (CGFloat)ln_y
{
    return self.frame.origin.y;
}




- (void)setLn_centerX:(CGFloat)ln_centerX
{
    CGPoint center = self.center;
    center.x = ln_centerX;
    self.center = center;
}
- (CGFloat)ln_centerX
{
    return self.center.x;
}



- (void)setLn_centerY:(CGFloat)ln_centerY
{
    CGPoint center = self.center;
    center.y = ln_centerY;
    self.center = center;
}
- (CGFloat)ln_centerY
{
    return self.center.y;
}




- (void)setLn_width:(CGFloat)ln_width
{
    CGRect frame = self.frame;
    frame.size.width = ln_width;
    self.frame = frame;
}
- (CGFloat)ln_width
{
    return self.frame.size.width;
}





- (void)setLn_height:(CGFloat)ln_height
{
    CGRect frame = self.frame;
    frame.size.height = ln_height;
    self.frame = frame;
}
- (CGFloat)ln_height
{
    return self.frame.size.height;
}





- (void)setLn_size:(CGSize)ln_size
{
    CGRect frame = self.frame;
    frame.size = ln_size;
    self.frame = frame;
}
- (CGSize)ln_size
{
    return self.frame.size;
}





- (void)setLn_origin:(CGPoint)ln_origin
{
    CGRect frame = self.frame;
    frame.origin = ln_origin;
    self.frame = frame;
}
- (CGPoint)ln_origin
{
    return self.frame.origin;
}


- (void)setLn_top:(CGFloat)ln_top
{
    CGRect frame = self.frame;
    frame.origin.y = ln_top;
    self.frame = frame;
}
- (CGFloat)ln_top
{
    return self.frame.origin.y;
}


- (void)setln_left:(CGFloat)ln_left
{
    CGRect frame = self.frame;
    frame.origin.x = ln_left;
    self.frame = frame;
}
- (CGFloat)ln_left
{
    return self.frame.origin.x;
}


- (void)setln_bottom:(CGFloat)ln_bottom
{
    CGRect frame = self.frame;
    frame.origin.y = ln_bottom - frame.size.height;
    self.frame = frame;
}
- (CGFloat)ln_bottom{
    return self.frame.origin.y + self.frame.size.height;
}


- (void)setln_right:(CGFloat)ln_right
{
    CGRect frame = self.frame;
    frame.origin.x = ln_right - frame.size.width;
    self.frame = frame;
}
- (CGFloat)ln_right{
    return self.frame.origin.x + self.frame.size.width;
}

@end
